import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue()],
  resolve: {
		alias: {
			'@': '/src',
			'~': '/src/assets'
		}
	},
	server: {
		port: 5128,
		host: true,
		open: true,
		proxy: {
			'/dev': {
				target: 'http://localhost:8080',
				changeOrigin: true,
				rewrite: (p) => p.replace(/^\/dev/, '')
			},
			'/production': {
				target: 'http://121.43.175.219:8080',
				changeOrigin: true,
				rewrite: (p) => p.replace(/^\/production/, '')
			}
		},
	},
})
